
class testHashCombine  {
     // @abi action
    void reveal(const uint64_t& id, const checksum256& seed);
    uint8_t compute_random_roll(const checksum256& seed1, const checksum160& seed2) {
            size_t hash = 0;
            hash_combine(hash, sha256_to_hex(seed1));
            hash_combine(hash, sha1_to_hex(seed2));
            return hash % 100 + 1;
    }

    string sha256_to_hex(const checksum256& sha256) {
        return to_hex((char*)sha256.hash, sizeof(sha256.hash));
    }

    string sha1_to_hex(const checksum160& sha1) {
        return to_hex((char*)sha1.hash, sizeof(sha1.hash));
    }

    // copied from boost https://www.boost.org/
    template <class T>
    inline void hash_combine(std::size_t& seed, const T& v) {
        std::hash<T> hasher;
        seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
    }
    
}


